home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / SCIENTIF / CHEMISTR / 4098.ZIP / MOLECULE.ZIP / README < prev    next >
Text File  |  1989-11-08  |  6KB  |  168 lines

  1.  
  2.       Molecule - Van-der-Waals display of crystallographic data
  3.       =========================================================
  4.  
  5.                 by
  6.  
  7.               Carlos D. Blanco
  8.  
  9.              November 8th, 1989
  10.  
  11. Requirements:
  12. =============
  13.  
  14. 1) VGA adapter
  15. 2) 640k of memory
  16. 3) FAST (at least 12Mhz) computer
  17.  
  18.  
  19. Background
  20. ==========
  21.  
  22. 'Molecule' was a homework assignment for a Computer Science graphics class
  23. at the University of Arizona.  It was originally developed to be run on
  24. a Raster Technologies Model One/80, a machine capable of displaying 16
  25. million colors at a resolution of over 1000 by 1000 pixels.  During
  26. the debugging process, however, I found it useful to create an MS-DOS
  27. version of the program that would run with the more modest 16 colors
  28. (at 640x480) of a VGA-compatible video card.  The results are not that
  29. bad, although they are much less realistic than the ones I obtained with
  30. the Model One/80.  If I ever upgrade to super-VGA I will release a new
  31. version to take advantage of the extra colors/resolution.  The program
  32. does run at a rather slow rate, mainly because of the many floating point
  33. calculations.
  34.  
  35.  
  36. Description:
  37. ============
  38.  
  39. 'Molecule' reads a description of a molecule from a file and creates an
  40. orthographic and light-shaded view of a spherical representation of the
  41. molecule on a standard IBM VGA.
  42.  
  43. A molecule description consists of a sequence of definition and instance
  44. lines.  A definition line for an atom has the syntax
  45.  
  46.   <ASCII char> = <radius:real> (<r:real[0,1]>, <g:real[0,1]>, <b:real[0,1]>)
  47.  
  48. The printable character is declared to be a name(referred to in instance lines)
  49. for a sphere of positive radius 'radius' and rgb color given by r, g, and b,
  50. where r, g, and b are within [0,1].  An atom may not be defined twice.
  51.  
  52. IMPORTANT: On this MS-DOS version of the program only the last color parameter
  53.        b has any meaning.  The other two are leftovers from the One/80
  54.        version and might be used in a future release.
  55.  
  56. An instance line has the syntax
  57.  
  58.   <ASCII char> : <x-coord:real> <y-coord:real> <z-coord:real>
  59.  
  60. This line asserts that an atom of the type named by the character is found
  61. in the molecule and that it has its center at the point (x-coord, y-coord,
  62. z-coord) in world space.  It is an error to specify an instance of an
  63. atom not previously defined.
  64.  
  65.       e.g. the water molecule at its minimum energy state is
  66.  
  67.             H=1.0(0.5, 0.5, 0.5)
  68.             O=3.2(0.2, 0.2, 1.0)
  69.             H: 2.5 2.0 0.0
  70.             O: 0.0 0.0 0.0
  71.             H: -2.5 2.0 2.0
  72.  
  73.        For another example, see the ferrodoxin file.
  74.  
  75. The molecule will always be uniformly scaled in all three dimensions so that
  76. it is always centered and justs fits on the screen AND the maximum atom
  77. radius is 30 pixels AND the minimum radius is at least 2 pixels.
  78.  
  79.  
  80. Syntax:
  81. =======
  82.  
  83. molecule filename [view=x,y] [lite=x,y] [no]
  84.  
  85. Required :
  86.   filename : the file from which to read the molecule description.
  87.  
  88. Optional:
  89.   view=x,y (no spaces!!) : rotate the molecule counterclockwise by x degrees
  90.              about the x-axis and by y degrees about the y axis
  91.              before displaying it.  Without this option, the view
  92.              is an orthographic projection with DOP along the
  93.              z-axis, i.e. view=0,0 and the molecule coming out
  94.              of the screen towards you.
  95.   lite=x,y : rotate the light source as for the view.  The default light is
  96.        at lite=-45,45.
  97.   no : do not perform atom intersections. This I think might look better
  98.        in certain cases.
  99.  
  100. e.g try out 'molecule ferrodox'
  101.         'molecule test'
  102.         'molecule test no'
  103.         'molecule test view=60,-60 no'
  104.         'molecule ferrodox view=-45,45 lite=90,0'
  105.  
  106.  
  107. Exiting
  108. =======
  109.  
  110. After the program has stopped displaying atoms, you may press any key to
  111. return to dos.
  112.  
  113.  
  114. Bugs
  115. ====
  116.  
  117. Yes, the program might have a few floating-point bugs which will show
  118. themselves as blank lines in spheres.
  119.  
  120.  
  121. Finally
  122. =======
  123.  
  124. If you are seriously interested in this program and would like to see a
  125. version that supports a math coprocessor or if you would just like to
  126. leave me a comment, you can reach me at CIS 73707,2334, at some Tucson
  127. BBSs, or at 'carlos@arizona.edu'.
  128.  
  129. The program may be freely copied or run without any charge whatsoever. For
  130. those interested, 'molecule' was written entirely in C (thanks to conditional
  131. compilation!!).  Thanks go to my instructor Gene Myers for the assignment, the
  132. texture routine, and an 'almost complete' algorithm for hidden surface removal.
  133.  
  134.          ----------------end-of-author's-documentation---------------
  135.  
  136.                         Software Library Information:
  137.  
  138.                    This disk copy provided as a service of
  139.  
  140.                         The Public (Software) Library
  141.  
  142.          We are not the authors of this program, nor are we associated
  143.          with the author in any way other than as a distributor of the
  144.          program in accordance with the author's terms of distribution.
  145.  
  146.          Please direct shareware payments and specific questions about
  147.          this program to the author of the program, whose name appears
  148.          elsewhere in  this documentation. If you have trouble getting
  149.          in touch with the author,  we will do whatever we can to help
  150.          you with your questions. All programs have been tested and do
  151.          run.  To report problems,  please use the form that is in the
  152.          file PROBLEM.DOC on many of our disks or in other written for-
  153.          mat with screen printouts, if possible.  The P(s)L cannot de-
  154.          bug programs over the telephone.
  155.  
  156.          Disks in the P(s)L are updated monthly, so if you did not get
  157.          this disk  directly from the P(s)L,  you should be aware that
  158.          the files in this set may no  longer be the current versions.
  159.  
  160.          For a copy of the latest monthly software library newsletter
  161.          and a list of the 2,000+ disks in the library, call or write
  162.  
  163.                         The Public (Software) Library
  164.                               P.O.Box 35705 - F
  165.                            Houston, TX 77235-5705
  166.                                (713) 665-7017
  167.  
  168.